package com.yuandian.api.management.feign;

import com.yuandian.api.business_monitor.po.SearchParams;
import com.yuandian.bpm.common.core.constant.SecurityConstants;
import com.yuandian.bpm.common.core.util.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestHeader;

import java.util.List;
import java.util.Map;

/**
 * 说明：远程调用选项接口服务
 * @Author zfsn
 * @Date 2023/3/14 16:06
 */
@FeignClient(contextId = "RemoteEmployeeService", value = "bpm-management")
public interface RemoteEmployeeService {

	/**
	 * 查询营业员信息并装换成 Map<操作员ID， 操作员名称>
	 *
	 * @param params 业务编码集合
	 * @return 搜索选项vo对象集合
	 */
	@PostMapping("/employee/getOperatorMap")
	Map<String, String> getOperatorMap(SearchParams params);
	@PostMapping("/innerInterface/getOperatorMap")
	Map<String, String> getOperatorMap(SearchParams params, @RequestHeader(SecurityConstants.FROM) String from);

	/**
	 * 根据操作员列表获取操作员Id列表
	 *
	 * @param operatorName
	 * @return 搜索选项vo对象集合
	 */
	@PostMapping("/employee/{operatorName}")
	R<List<String>> getOperatorIdListByOperatorNameList(@PathVariable("operatorName") String operatorName);
	@PostMapping("/employee/{operatorName}")
	R<List<String>> getOperatorIdListByOperatorNameList(@PathVariable("operatorName") String operatorName, @RequestHeader(SecurityConstants.FROM) String from);
}
